package com.qf.service.impl;

import com.alibaba.druid.support.spring.stat.annotation.Stat;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsUserMapper;
import com.qf.mapper.StatMapper;
import com.qf.pojo.DtsAdmin;
import com.qf.pojo.DtsUser;
import com.qf.service.UserService;
import com.qf.vo.DayStatis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    DtsUserMapper userMapper;
    @Autowired
    StatMapper statMapper;
    @Override
    public int showAllUserCount() {
        LambdaQueryWrapper<DtsUser> queryWrapper=new LambdaQueryWrapper();
        queryWrapper.eq(DtsUser::getDeleted,false);
        Integer integer = userMapper.selectCount(queryWrapper);
        return  integer;
    }

    @Override
    public List<DayStatis> findUserDayStatis(int day) {
        return statMapper.findUserDayStatis(day);
    }


}
